package com.atguigu.spzx.manager.mapper;

import com.atguigu.spzx.model.dto.system.SysUserDto;
import com.atguigu.spzx.model.entity.system.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName: SysUserMapper
 * Package: com.atguigu.spzx.manager.mapper
 * Description:
 *
 * @Author 刘强
 * @Create 2024/6/29 11:39
 * @Version 1.0
 */
@Mapper
public interface SysUserMapper {
    SysUser selectByPhone(@Param("phone") String phone);
    SysUser selectByUsername(@Param("username") String userName);

    List<SysUser> findByPage(@Param("sysUserDto") SysUserDto sysUserDto, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    void saveSysUser(@Param("sysUser") SysUser sysUser);

    void updateSysUser(@Param("sysUser") SysUser sysUser);

    /**
     * 根据用户id删除用户
     * @param sysUserId
     */
    void deleteById(@Param("sysUserId") Long sysUserId);
}
